package com.ruoyi.miniapp.service.impl;
import com.ruoyi.miniapp.domain.Maintain;
import com.ruoyi.miniapp.mapper.MaintainMapper;
import com.ruoyi.miniapp.service.IMaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 维修记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-23
 */
@Service
public class MaintainServiceImpl implements IMaintainService
{
    @Autowired
    private MaintainMapper maintainMapper;

    /**
     * 查询维修记录
     * 
     * @param maintainId 维修记录主键
     * @return 维修记录
     */
    @Override
    public Maintain selectMaintainByMaintainId(Long maintainId)
    {
        return maintainMapper.selectMaintainByMaintainId(maintainId);
    }

    /**
     * 查询维修记录列表
     * 
     * @param maintain 维修记录
     * @return 维修记录
     */
    @Override
    public List<Maintain> selectMaintainList(Maintain maintain)
    {
        return maintainMapper.selectMaintainList(maintain);
    }

    /**
     * 新增维修记录
     * 
     * @param maintain 维修记录
     * @return 结果
     */
    @Override
    public int insertMaintain(Maintain maintain)
    {
        return maintainMapper.insertMaintain(maintain);
    }

    /**
     * 修改维修记录
     * 
     * @param maintain 维修记录
     * @return 结果
     */
    @Override
    public int updateMaintain(Maintain maintain)
    {
        return maintainMapper.updateMaintain(maintain);
    }

    /**
     * 批量删除维修记录
     * 
     * @param maintainIds 需要删除的维修记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintainByMaintainIds(Long[] maintainIds)
    {
        return maintainMapper.deleteMaintainByMaintainIds(maintainIds);
    }

    /**
     * 删除维修记录信息
     * 
     * @param maintainId 维修记录主键
     * @return 结果
     */
    @Override
    public int deleteMaintainByMaintainId(Long maintainId)
    {
        return maintainMapper.deleteMaintainByMaintainId(maintainId);
    }
}
